package com.googlecode.struts2scope.context.factory;

import java.util.Map;

import com.googlecode.struts2scope.context.Context;
import com.googlecode.struts2scope.context.ContextImpl;
import com.opensymphony.xwork2.ActionContext;

public class SessionContextFactory implements ContextFactory {

	@SuppressWarnings("unchecked")
	public Context buildContext() {
		Map<String, Object> session = ActionContext.getContext().getSession();
		return new ContextImpl(session);
	}
}
